	var tool;
		var keyvalue;
		function initInfo(){
			tool = new AIToolTip();
		}

		function getkey(obj){
			tool.OnKeyUp(obj);
		}
		function AIToolTip(){
			this.keyList=new Array();
			this.currentSelectedItem=null;
			this.input=null;//当前的输入框
			this.index=-1;
			this.length=0;
			this.hasFocus=false;
			this.div=document.createElement("DIV");
			this.div.className="tooltip";
			this.div.style.display="none";
			this.div.attachEvent("onmouseout",this.Div_OnMouseOut);
			this.div.attachEvent("onmouseover",this.Div_OnMouseOver);
			document.body.appendChild(this.div);
			keyvalue="";
		}
		AIToolTip.prototype.OnKeyUp=function(o){		
			this.input=o;
			if(!o.getAttribute("hasTip")){
				o.setAttribute("hasTip",true);
				o.attachEvent("onblur",this.Input_OnBlur);
			}
			
			switch(event.keyCode){
				case 38:this.Previous();//向上
					break;
				case 40:this.Next();//向下
					break;
				case 37:		
				case 39:				
					break;
				case 13:this.EnterKey();//回车		
					break;
				default:this.GetValuesFromUrl();//录入数据			
			}
		}
		AIToolTip.prototype.GetValuesFromUrl = function()
		{
			var keys = this.input.value;
			if(keyvalue!=keys && keys!=""){
				this.ClearAll();
				//添加数据
				parseMessage(keys);
				keyvalue = keys;
			}
		}
		AIToolTip.prototype.ClearAll=function(){
			this.div.innerHTML="";				
			this.index=-1;
			this.length=0;
			while(this.keyList.pop()!=undefined){
				
			}
		}
		function parseMessage(idCard) {
			getCustermerLikeIdCard(idCard);
		}
		AIToolTip.prototype.AddItem=function(text,cusId){
			var a=document.createElement("A");
			a.innerText=text;
			a.name =cusId;
			a.attachEvent("onmousemove",this.A_MouseMove);
			a.attachEvent("onmouseout",this.A_MouseOut);
			a.attachEvent("onclick",this.A_OnClick);
			a.setAttribute("index",this.length);
			this.keyList.push(text);
			this.div.appendChild(a);
			this.length++;
		}
		AIToolTip.prototype.A_MouseMove=function(){
			var obj=event.srcElement;
			if(tool.currentSelectedItem!=null){
				tool.UnSelectItem(tool.currentSelectedItem);
			}
			tool.SelectItem(obj);
//			tool.input.value=obj.innerText;
			tool.index=obj.getAttribute("index");
			tool.currentSelectedItem=obj;
		}
		AIToolTip.prototype.UnSelectItem=function(obj){
			obj.style.backgroundColor="";
			obj.style.color="";
		}
		AIToolTip.prototype.SelectItem=function(obj){
			obj.style.backgroundColor="blue";
			obj.style.color="#ffffff";
			this.index=obj.getAttribute("index");
			this.currentSelectedItem=obj;
		}
		AIToolTip.prototype.A_MouseOut=function(){
			var obj=event.srcElement;
			tool.currentSelectedItem=obj;
		}
		AIToolTip.prototype.A_OnClick=function(){
			var obj=event.srcElement;
//			tool.input.value=obj.innerText;
			tool.input.value="";
			tool.Hide();
			putCustomerLi(obj);
		}
		AIToolTip.prototype.Hide=function(){
			this.div.style.display="none";
		}
		AIToolTip.prototype.Show=function(){
			var tip=this.div.style;
			var mo=this.input;
			var top=mo.offsetTop;
			var hei=mo.clientHeight;
			var left=mo.offsetLeft;
			while(mo=mo.offsetParent){					
				top+=mo.offsetTop;
				left+=mo.offsetLeft;
			}
			tip.top=top+20;
			tip.left=left;
			tip.display="";
			this.div.style.posWidth=this.input.offsetWidth;
		}
		AIToolTip.prototype.Next=function(){
			this.index<this.length-1?this.index++:0;
			if(this.currentSelectedItem!=null){
				this.UnSelectItem(this.currentSelectedItem);
			}
			this.SelectItem(this.div.childNodes[this.index]);
			this.currentSelectedItem=this.div.childNodes[this.index];
			this.input.value=this.div.childNodes[this.index].innerText;
		}
		AIToolTip.prototype.Previous=function(){
			this.index>0?this.index--:0;
			if(this.currentSelectedItem!=null){
				this.UnSelectItem(this.currentSelectedItem);
			}
			this.SelectItem(this.div.childNodes[this.index]);
			this.currentSelectedItem=this.div.childNodes[this.index];
			this.input.value=this.div.childNodes[this.index].innerText;
		}
		AIToolTip.prototype.Div_OnMouseOut=function(){
			tool.hasFocus=false;
		}
		AIToolTip.prototype.Div_OnMouseOver=function(){
			tool.hasFocus=true;
		}
		AIToolTip.prototype.Input_OnBlur=function(){
			if(tool.hasFocus){
				
			}else{
				tool.Hide();
			}
		}
		AIToolTip.prototype.EnterKey=function(){
			if(this.currentSelectedItem!=null){
				this.input.value=this.currentSelectedItem.innerText;
			}
			this.Hide();				
		}